<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>编辑用户</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/customer.css">
</head>
<c:if test="${not empty requestScope.customer}">
    <c:set var="id" scope="session" value="${customer.id}" />
    <c:set var="username" scope="session" value="${customer.username}" />
    <c:set var="nickname" scope="session" value="${customer.nickname}" />
</c:if>
<body>
<h3>编辑用户</h3>
<div class="message">${ message }</div>
<div class="form-container">
    <form action="${pageContext.request.contextPath}/customer/edit" method="post">
        <input type="hidden" name="id" value="${id}">
        <div class="form-row">
            <label for="username">登录名称</label>
            <input type="text" name="username" value="${username}" id="username" readonly>
        </div>
        <div class="form-row">
            <label for="nickname">昵称</label>
            <input type="text" name="nickname" value="${nickname}" id="nickname">
        </div>
        <div class="form-buttons">
            <button type="submit">确定修改</button>
        </div>
    </form>
</div>

<c:remove var="message" scope="session" />
<c:remove var="id" scope="session" />
<c:remove var="username" scope="session" />
<c:remove var="nickname" scope="session" />

</body>
</html>
